This invention is related to the control of a timed process using multiple timing devices, and, more specifically, to the control of a timed process wherein one timer is used to set a limit on the operation of another timer.
Computer communications networks typically employ some sort of handshaking process where a sending station sends a signal to a receiving station then waits a first predetermined time for a response from the receiving station. If there is no response from the receiving station within a first predetermined amount of time, the sending station sends another signal and waits again for a response. The sending computer continues this process until the receiving station responds or until a second predetermined time has elapsed. This type of handshaking process may be used, for example, in routines for verifying a logical path (channel) connection between the sending and receiving stations in a dynamically connected communications network.
The handshaking process described above requires the use of at least two timers. An iteration timer to limit the duration of each iteration to the first predetermined amount of time, and a process control timer to limit the total number of iterations to those that can be completed in the second predetermined amount of time. Typically, these timers are implemented in an input/output control program (IOCP) operating in the sending station. The IOCP controls a number of communication channels between the sending station and a plurality of receiving stations.
FIG. 1 depicts a successful communication between the sending and receiving stations. As can be seen in FIG. 1, the sending station provides an xe2x80x9cattemptxe2x80x9d signal at time t0. At time t1, this signal is received by the receiving station, the difference between t0 and t1 being the propagation delay due to factors such as distance between the sending and receiving station or the type of communications medium between the sending and receiving stations. After the signal is received, the receiving station processes the signal and provides a response signal at a time t2. The difference between t1 and t2 being the processing time of the receiving station. The response signal is then received at the sending station at a time t3, the difference between t3 and t2 being attributable to propagation delay. After the signal is received, it is then processed by the sending station, and the successful handshaking process is complete at a time t4. The iteration timer is set to time out after the first predetermined amount of time, xcex94T1, which starts at time t0 and ends at time t4 so that another attempt signal can be sent immediately if the sending station determines that the receiving station has not responded.
FIG. 2 depicts an unsuccessful communication attempt between the sending and receiving stations. The sending station provides an attempt signal at time t0. The iteration timer then waits the first predetermined amount of time, xcex94T1, and signals the IOCP to provide another attempt signal. When no response is received at the end of the second predetermined amount of time, xcex94T2, the process control timer times out and the process is stopped. The second predetermined amount of time is equal to a multiple xe2x80x9cnxe2x80x9d of the first predetermined amount of time, where xe2x80x9cnxe2x80x9d is the number of handshaking attempts (iterations).
There are many factors that dictate the setting of the iteration timer, xcex94T1, including the propagation time between the sending and receiving stations, and the processing time of the sending and receiving stations. Because these factors vary with different channels, it is necessary for the iteration timer to be configurable. That is, xcex94T1 must be lengthened and shortened to accommodate the response time of different channels. However, if xcex94T1 is made greater than the setting of the process control timer, xcex94T2, the process will be terminated by the process control timer before a response signal is received. To avoid this, xcex94T2 is increased to allow xe2x80x9cnxe2x80x9d attempts of the handshaking process.
Increasing both the iteration and process control timers to accommodate slower channels may be acceptable for a system having one process control timer and one iteration timer for each channel. However, for systems employing one process control timer for a number of channels, reconfiguring both the iteration and process control timers can lead to delays in the processing of faster channels. Take, for example, a system having one process control timer for two channels, with each channel having its own iteration timer. If one of the channels provides a relatively fast response time and the other of the channels provides a relatively slow response time, the process control timer must be configured for xe2x80x9cnxe2x80x9d number of attempts of the slow channel. Thus, while the slow channel will make xe2x80x9cnxe2x80x9d or fewer attempts, the fast channel may make many more than xe2x80x9cnxe2x80x9d attempts before the process control timer stops the process. This result can be seen by a comparison of FIGS. 2 and 3. FIG. 3 shows a timing diagram for an unsuccessful communication attempt between sending and receiving stations having a faster communication channel than the network shown in FIG. 2 and with the same process control timer setting as shown in FIG. 2. The result of setting the process control timer to ensure 2 attempts for the slower channel of FIG. 2 is six attempts by the faster channel of FIG. 3. The additional attempts by the faster channel, caused by the increase of xcex94T2, increases inefficiency in the communications network for the faster channel.
In an exemplary embodiment of the invention, a dual-timer control system includes an iteration timer arranged for providing an iteration stop signal a first predetermined amount of time after a system start time, and a process control timer arranged for providing a process stop signal a second predetermined amount of time after the system start time. The dual-timer control system also includes a process unit arranged to start a procedure at the system start time and stop the procedure in response to the iteration stop signal. The process unit is also arranged to perform the procedure nxe2x88x921 times in response to the procedure stop signal, where n is a minimum number of iterations of the procedure.
Because the process unit performs nxe2x88x921 more iterations after the process control timer has timed out, the process control timer can be set to time out earlier than the iteration timer. Thus, for systems employing one process control timer for a number of procedures, the process control timer can be set to time out after n iterations of the faster procedures. As a result, the present invention reduces the number of additional, inefficient iterations of the faster procedures.